package com.sbm.util;

import java.util.UUID;

public class StringUtil {

        /**
         * 判断字符串是否未null或者""
         *
         * @param str
         *            字符串
         * @return 判断结果
         */
        public static boolean isEmpty(String str) {
            if (str == null || "".equals(str)) {
                return true;
            }

            return false;
        }

        /**
         * 生成uuid
         *
         * @return uuid
         */
        public static String generateUuid() {
            UUID id = UUID.randomUUID();
            String[] array = id.toString().split("-");
            StringBuffer sb = new StringBuffer();
            for (String str : array) {
                sb.append(str.toUpperCase());
            }
            return sb.toString();
        }


}
